<template>
  <el-form
      :inline="true"
      class="filter-form-inline"
      label-position="right"
      label-width="130px"
      size="small"
  >
    <el-row :gutter="0" style="margin-left: 0px; margin-right: 0px">
      <el-col :lg="24" :xs="4" style="padding-left: 0;padding-right: 0">
        <item-title title="基本信息"/>
      </el-col>
      <el-col :lg="8" :xs="4">
        <el-form-item label="统一社会信用码：">
          <span>{{ formData?.creditCode }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :xs="4">
        <el-form-item label="联系人：">
          <span>{{ formData?.userName }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :xs="4">
        <el-form-item label="联系电话：">
          <span>{{ formData?.tel }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :xs="4">
        <el-form-item class="item_col" label="创建人：">
          <span>{{ formData?.creatorName }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :xs="4">
        <el-form-item label="创建时间：">
          <span>{{ dateFormat("yyyy-mm-dd HH:MM:SS", formData?.createdAt) }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="24" :xs="4" style="padding-left: 0;padding-right: 0">
        <item-title title="资质信息"/>
      </el-col>
      <el-col :lg="24">
        <div v-if="formData?.businessLicenseFiles && formData?.businessLicenseFiles.length > 0"
             class="qualityFiles-container">
          <div v-for="(item,index) in formData?.businessLicenseFiles" :key="index" class="file-item">
            <image-upload-view ref="imageUploadView" :data="item" disabled="true"/>
          </div>
        </div>
        <div v-else>
          <el-empty description="该终端未上传资质"/>
        </div>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
import {inject, reactive} from 'vue'

export default {
  name: 'Details',
  props: {
    formData: {
      type: Object,
      default: {}
    },

  },
  setup(props, context) {
    const api = inject('api')
    const data = reactive({})
    return {}
  }

}

</script>

<style scoped>
/* @import url(); 引入css类 */
.qualityFiles-container {
  display: flex;
  flex-wrap: wrap;
}
</style>
